package com.ktjiaoyu.service.impl;

import com.ktjiaoyu.entity.SysRole;
import com.ktjiaoyu.mapper.SysRoleMapper;
import com.ktjiaoyu.service.SysRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.transaction.Transactional;

@Service("sysRoleServiceImpl")
public class SysRoleServiceImpl implements SysRoleService {
    @Autowired
    private SysRoleMapper sysRoleMapper;
    @Transactional
    @Override
    public int insert(SysRole sysRole) {
        return sysRoleMapper.insert(sysRole);
    }

    @Transactional
    @Override
    public int delete(Long id) {
        return sysRoleMapper.delete(id);
    }

    @Transactional
    @Override
    public int update(SysRole sysRole) {
        return sysRoleMapper.update(sysRole);
    }
}
